package com.rightsidetech.activity.service;

import com.github.pagehelper.PageInfo;
import com.rightsidetech.activity.dto.request.ActOrderNumReq;
import com.rightsidetech.activity.dto.request.gift.*;
import com.rightsidetech.activity.dto.response.gift.*;
import com.rightsidetech.activity.entity.ActGiftActivityStore;
import com.rightsidetech.commom.base.DelReq;
import com.rightsidetech.commom.base.ResponseData;

import java.util.List;

public interface ActGiftService {

    ResponseData saveActGift(ActGiftSaveReq req,String createrName,Long createrId,List<Long> oldStoreIds) throws Exception;

    ResponseData<PageInfo<ActGiftPageResp>> page(ActGiftPageReq req);

    List<ActGiftActivityStore> selectActStoreByGiftId(Long giftId);

    ResponseData<ActGiftDetailResp> details(Long id);

    ResponseData arraignmentAct(DelReq req);

    ResponseData verifyAct(ActVerifyReq req,String createrName,Long createrId) throws Exception;

    ResponseData updateAct(ActGiftUpReq req,String updaterName,Long updaterId,List<Long> storeIds) throws Exception;

    ResponseData delete(DelReq req);

    List<Long> getTypeIdsByActId(Long giftActivityId);

    List<ActGiftUserAppResp> selectGiftIdAndNum(Long typeId,Long storeId);

    boolean checkGift(Long typeId,Long giftId,Long storeId);

    /**
     * 判断商品分类下是否存在换购商品
     * @return true存在 false反之
     */
    boolean isGiftByTypeId(Long typeId,Long storeId);

    void updateActByOrder(List<ActOrderNumReq> req);

    ResponseData<PageInfo<ActGiftCountPageResp>> countActPage(ActGiftCountPageReq req);

    ResponseData<List<ActGiftCountDetailResp>> countDetail(DelReq req);

    void updateStatus();

    List<Integer> selectByGiftId(long id);
}
